# $Id$
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: boromil@gmail.com

pkgname=ffmpegthumbnailer
pkgver=2.2.0
pkgrel=1
pkgdesc="Lightweight video thumbnailer that can be used by file managers."
url="https://github.com/dirkvdb/ffmpegthumbnailer"
license=('GPL2')
arch=('i686' 'x86_64')
depends=('ffmpeg' 'libjpeg' 'libpng')
makedepends=('cmake')
optdepends=('gvfs: support for gio uris')
source=("https://github.com/dirkvdb/$pkgname/archive/$pkgver.tar.gz")
sha1sums=('cbd130569ed56f8e3097378b52d66dde2f23b0d4')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  mkdir -p build
  cd build
  cmake .. \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_INSTALL_LIBDIR=lib \
	-DENABLE_GIO=ON \
	-DENABLE_THUMBNAILER=ON
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"/build
  make DESTDIR="${pkgdir}" install
}
